Skip to content

[python] Fix RecursionError in vector search with many splits#7823

Merged
JingsongLi merged 6 commits into
apache:masterfrom
XiaoHongbo-Hope:lumina_fix
May 13, 2026
Merged

[python] Fix RecursionError in vector search with many splits#7823
JingsongLi merged 6 commits into
apache:masterfrom
XiaoHongbo-Hope:lumina_fix

Conversation

@XiaoHongbo-Hope
Copy link
Copy Markdown
Contributor

@XiaoHongbo-Hope XiaoHongbo-Hope commented May 12, 2026

Purpose

#7752 fixed the closure chain recursion in BTree path, but Lumina / Tantivy path still nests score_getter closures, causing the same issue. This PR fixes it.

Tests

@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as draft May 12, 2026 04:59
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review May 12, 2026 06:42
Copy link
Copy Markdown
Contributor

@leaves12138 leaves12138 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I checked the updated dict-based merge against the previous recursive or_ semantics:

  • duplicate row ids still keep the earlier/left result, matching the old chained merge behavior;
  • top_k is still applied after merging all split results, so high-scored rows from later splits are retained;
  • vector search and full-text search now use the same non-recursive merge strategy, which avoids the deep score_getter chain for many splits.

I also ran the focused vector_search_filter_test.py suite locally with a temporary pure-Python bitmap stub because this container cannot use the native pyroaring.BitMap64 dependency; all 11 tests passed under that setup.

@JingsongLi
Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 826c674 into apache:master May 13, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants